Plug leak in gdkcairo.c
authorXan Lopez <xan@gnome.org>
Sun, 10 Oct 2010 15:16:52 +0000 (00:16 +0900)
committerBenjamin Otte <otte@redhat.com>
Mon, 11 Oct 2010 00:33:09 +0000 (02:33 +0200)
1,968 (1,236 direct, 732 indirect) bytes in 1 blocks are definitely lost in loss record 11,816 of 11,947
   at 0x4025BDC: malloc (vg_replace_malloc.c:195)
   by 0x6950676: _context_get (cairo.c:250)
   by 0x6950940: cairo_create (cairo.c:370)
   by 0x685CD1E: _gdk_cairo_surface_extents (gdkcairo.c:381)
   by 0x685CEDA: gdk_cairo_region_create_from_surface (gdkcairo.c:433)

Signed-off-by: Benjamin Otte <otte@redhat.com>
gdk/gdkcairo.c

index 4e7c8ffcb154c9eb5902106752d1fb263821c898..563725ccff1600b6d546a333d43e58c9cb62f699 100644 (file)
@@ -380,6 +380,7 @@ _gdk_cairo_surface_extents (cairo_surface_t *surface,
 
   cr = cairo_create (surface);
   cairo_clip_extents (cr, &x1, &y1, &x2, &y2);
+  cairo_destroy (cr);
 
   x1 = floor (x1);
   y1 = floor (y1);